<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>文件查找</title>
    <!-- 引入 Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- 引入 Font Awesome -->
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
    <style>
        /* 动态背景样式 */
        body {
            background: linear-gradient(45deg, #34e89e, #0f3443, #4facfe, #00c6ff);
            background-size: 300% 300%;
            animation: gradientAnimation 8s ease infinite;
            color: #fff;
            font-family: 'Arial', sans-serif;
        }
        @keyframes gradientAnimation {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        .container {
            max-width: 800px;
            margin: 3rem auto;
            background: rgba(255, 255, 255, 0.9); /* 半透明白色背景 */
            color: #333;
            padding: 2rem;
            border-radius: 1rem;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        }
        .form-label {
            font-weight: bold;
        }
        .form-select, .form-control {
            border-radius: 0.5rem;
        }
        .btn-primary {
            width: 100%;
            padding: 0.8rem;
            font-size: 1rem;
            border-radius: 0.5rem;
            background: linear-gradient(135deg, #36d1dc, #5b86e5);
            border: none;
        }
        .btn-primary:hover {
            background: linear-gradient(135deg, #5b86e5, #36d1dc);
        }
        a {
            color: #007bff;
            text-decoration: none;
        }
        a:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>

    <!-- 主容器 -->
    <div class="container">
        <h1 class="text-center text-primary mb-4">文件查找</h1>
        <form action="/find/" method="post">
            <!-- 目录路径 -->
            <div class="mb-3">
                <label for="directory" class="form-label">目录路径:</label>
                <input type="text" name="directory" id="directory" class="form-control" placeholder="请输入搜索的目录路径">
            </div>

            <!-- 关键词 -->
            <div class="mb-3">
                <label for="keyword" class="form-label">关键词:</label>
                <input type="text" name="keyword" id="keyword" class="form-control" placeholder="请输入关键词">
            </div>

            <!-- 模式选择 -->
            <div class="mb-3">
                <label for="mode" class="form-label">模式:</label>
                <select name="mode" id="mode" class="form-select">
                    <option value="name">文件名匹配</option>
                    <option value="content">文件内容匹配</option>
                </select>
            </div>

            <!-- 输出文件路径 -->
            <div class="mb-3">
                <label for="output_file" class="form-label">输出文件路径:</label>
                <input type="text" name="output_file" id="output_file" class="form-control" placeholder="请输入输出文件路径">
            </div>

            <!-- 提交按钮 -->
            <button type="submit" class="btn btn-primary">执行查找</button>
        </form>
        <div class="text-center mt-3">
            <a href="{{ url_for('index') }}">返回首页</a>
        </div>
    </div>

    <!-- 引入 Bootstrap JS -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
